/**
 * created by dqn 2018/3/17 10:35
 */

package main.repository;

import main.entity.SongCollect;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;
import java.util.Optional;

@Repository
@Transactional
public interface SongCollectRepository extends CrudRepository<SongCollect,Long> {
    public Optional<List<SongCollect>> getSongCollectsByUserId(int user);
    public Optional<SongCollect> getSongCollectBySongIdAndUserId(int song,int user);
    public void deleteSongCollectsBySongId(int id);
}
